View Javadoc

1   /***
2    * AuthorizationServiceBindingStub.java
3    *
4    * This file was auto-generated from WSDL
5    * by the Apache Axis WSDL2Java emitter.
6    */
7   
8   package org.opensciencegrid.authz.stubs;
9   
10  public class AuthorizationServiceBindingStub extends org.apache.axis.client.Stub implements org.opensciencegrid.authz.stubs.SAMLRequestPortType {
11      private java.util.Vector cachedSerClasses = new java.util.Vector();
12      private java.util.Vector cachedSerQNames = new java.util.Vector();
13      private java.util.Vector cachedSerFactories = new java.util.Vector();
14      private java.util.Vector cachedDeserFactories = new java.util.Vector();
15  
16      static org.apache.axis.description.OperationDesc [] _operations;
17  
18      static {
19          _operations = new org.apache.axis.description.OperationDesc[1];
20          org.apache.axis.description.OperationDesc oper;
21          oper = new org.apache.axis.description.OperationDesc();
22          oper.setName("SAMLRequest");
23          oper.addParameter(new javax.xml.namespace.QName("", "samlRequest"), new javax.xml.namespace.QName("http://www.gridforum.org/namespaces/2004/03/ogsa-authz/saml", "SAMLRequestType"), org.opensciencegrid.authz.stubs.SAMLRequestType.class, org.apache.axis.description.ParameterDesc.IN, false, false);
24          oper.setReturnType(new javax.xml.namespace.QName("http://www.gridforum.org/namespaces/2004/03/ogsa-authz/saml", "SAMLResponseType"));
25          oper.setReturnClass(org.opensciencegrid.authz.stubs.SAMLResponseType.class);
26          oper.setReturnQName(new javax.xml.namespace.QName("", "samlResponse"));
27          oper.setStyle(org.apache.axis.enum.Style.WRAPPED);
28          oper.setUse(org.apache.axis.enum.Use.LITERAL);
29          _operations[0] = oper;
30  
31      }
32  
33      public AuthorizationServiceBindingStub() throws org.apache.axis.AxisFault {
34           this(null);
35      }
36  
37      public AuthorizationServiceBindingStub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
38           this(service);
39           super.cachedEndpoint = endpointURL;
40      }
41  
42      public AuthorizationServiceBindingStub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
43          if (service == null) {
44              super.service = new org.apache.axis.client.Service();
45          } else {
46              super.service = service;
47          }
48              java.lang.Class cls;
49              javax.xml.namespace.QName qName;
50              java.lang.Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class;
51              java.lang.Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class;
52              java.lang.Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class;
53              java.lang.Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class;
54              java.lang.Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class;
55              java.lang.Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class;
56              java.lang.Class simplesf = org.apache.axis.encoding.ser.SimpleSerializerFactory.class;
57              java.lang.Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class;
58              qName = new javax.xml.namespace.QName("http://www.gridforum.org/namespaces/2004/03/ogsa-authz/saml", "SAMLRequestType");
59              cachedSerQNames.add(qName);
60              cls = org.opensciencegrid.authz.stubs.SAMLRequestType.class;
61              cachedSerClasses.add(cls);
62              cachedSerFactories.add(beansf);
63              cachedDeserFactories.add(beandf);
64  
65              qName = new javax.xml.namespace.QName("http://www.gridforum.org/namespaces/2004/03/ogsa-authz/saml", ">SAMLRequestResponse");
66              cachedSerQNames.add(qName);
67              cls = org.opensciencegrid.authz.stubs._SAMLRequestResponse.class;
68              cachedSerClasses.add(cls);
69              cachedSerFactories.add(beansf);
70              cachedDeserFactories.add(beandf);
71  
72              qName = new javax.xml.namespace.QName("http://www.gridforum.org/namespaces/2004/03/ogsa-authz/saml", "SAMLResponseType");
73              cachedSerQNames.add(qName);
74              cls = org.opensciencegrid.authz.stubs.SAMLResponseType.class;
75              cachedSerClasses.add(cls);
76              cachedSerFactories.add(beansf);
77              cachedDeserFactories.add(beandf);
78  
79      }
80  
81      private org.apache.axis.client.Call createCall() throws java.rmi.RemoteException {
82          try {
83              org.apache.axis.client.Call _call =
84                      (org.apache.axis.client.Call) super.service.createCall();
85              if (super.maintainSessionSet) {
86                  _call.setMaintainSession(super.maintainSession);
87              }
88              if (super.cachedUsername != null) {
89                  _call.setUsername(super.cachedUsername);
90              }
91              if (super.cachedPassword != null) {
92                  _call.setPassword(super.cachedPassword);
93              }
94              if (super.cachedEndpoint != null) {
95                  _call.setTargetEndpointAddress(super.cachedEndpoint);
96              }
97              if (super.cachedTimeout != null) {
98                  _call.setTimeout(super.cachedTimeout);
99              }
100             if (super.cachedPortName != null) {
101                 _call.setPortName(super.cachedPortName);
102             }
103             java.util.Enumeration keys = super.cachedProperties.keys();
104             while (keys.hasMoreElements()) {
105                 java.lang.String key = (java.lang.String) keys.nextElement();
106                 _call.setProperty(key, super.cachedProperties.get(key));
107             }
108             // All the type mapping information is registered
109             // when the first call is made.
110             // The type mapping information is actually registered in
111             // the TypeMappingRegistry of the service, which
112             // is the reason why registration is only needed for the first call.
113             synchronized (this) {
114                 if (firstCall()) {
115                     // must set encoding style before registering serializers
116                     _call.setEncodingStyle(null);
117                     for (int i = 0; i < cachedSerFactories.size(); ++i) {
118                         java.lang.Class cls = (java.lang.Class) cachedSerClasses.get(i);
119                         javax.xml.namespace.QName qName =
120                                 (javax.xml.namespace.QName) cachedSerQNames.get(i);
121                         java.lang.Class sf = (java.lang.Class)
122                                  cachedSerFactories.get(i);
123                         java.lang.Class df = (java.lang.Class)
124                                  cachedDeserFactories.get(i);
125                         _call.registerTypeMapping(cls, qName, sf, df, false);
126                     }
127                 }
128             }
129             return _call;
130         }
131         catch (java.lang.Throwable t) {
132             throw new org.apache.axis.AxisFault("Failure trying to get the Call object", t);
133         }
134     }
135 
136     public org.opensciencegrid.authz.stubs.SAMLResponseType SAMLRequest(org.opensciencegrid.authz.stubs.SAMLRequestType samlRequest) throws java.rmi.RemoteException {
137         if (super.cachedEndpoint == null) {
138             throw new org.apache.axis.NoEndPointException();
139         }
140         org.apache.axis.client.Call _call = createCall();
141         _call.setOperation(_operations[0]);
142         _call.setUseSOAPAction(true);
143         _call.setSOAPActionURI("http://www.gridforum.org/namespaces/2004/03/ogsa-authz/saml#SAMLRequest");
144         _call.setEncodingStyle(null);
145         _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
146         _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
147         _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
148         _call.setOperationName(new javax.xml.namespace.QName("http://www.gridforum.org/namespaces/2004/03/ogsa-authz/saml", "SAMLRequest"));
149 
150         setRequestHeaders(_call);
151         setAttachments(_call);
152         java.lang.Object _resp = _call.invoke(new java.lang.Object[] {samlRequest});
153 
154         if (_resp instanceof java.rmi.RemoteException) {
155             throw (java.rmi.RemoteException)_resp;
156         }
157         else {
158             extractAttachments(_call);
159             try {
160                 return (org.opensciencegrid.authz.stubs.SAMLResponseType) _resp;
161             } catch (java.lang.Exception _exception) {
162                 return (org.opensciencegrid.authz.stubs.SAMLResponseType) org.apache.axis.utils.JavaUtils.convert(_resp, org.opensciencegrid.authz.stubs.SAMLResponseType.class);
163             }
164         }
165     }
166 
167 }